<?php

class Language_model extends CI_Model {
    
    function Language_model() {
        $this->load->library('api/services/Language');
    }
    
    function language_get($language_id) {
        $data = Language::languageGet($language_id);
        
        if(!empty($data)) return $data;
        else return false;
    }    
    
    function language_set($name) {
        return Language::languageSet($name);
    }
    
    function language_delete($language_id) {
        return Language::languageDelete($language_id);
    }
    
    function language_update($language_id, $name) {
        return Language::languageRecordUpdate($language_id, 'name', 'varchar', $name);
    }
    
    function languages_list() {
        $data = Language::languagesList();
        
        if(!empty($data)) return $data;
        else return false;
    } 
    
    function languages_select($language_id) {
        $data = Language::languagesSelect($language_id);

        if(!empty($data)) return $data;
        else return false;
    }    
    
}

?>
